module executor.user.server.QrCodeExecutor;

import msgtrans;
import message.Constants;
import message.MsgDefine;
import google.protobuf;
import hunt.logging;
import hunt.util.Serialize;
import client.MsgServerClient;
import client.ImClient;
import client.LogicServerClient;
import std.array;
import std.conv : to;
import core.stdc.time;

@TransportServer(gateServerName)
class QrCodeExecutor : AbstractExecutor!(QrCodeExecutor) {

  @MessageId(MESSAGE.CMD_MAKE_QRCODE_REQ)
  void makeQrCode(TransportContext ctx, MessageBuffer buffer) {
    auto req = new MakeQrCodeREQ();
    buffer.data.fromProtobuf!MakeQrCodeREQ(req);

    MessageTransportClient client = LogicServerClient.getInstance.getForwardClient();
    client.send(new MessageBuffer(MESSAGE.CMD_MAKE_QRCODE_REQ,req.toProtobuf.array));
  }
}

